package com.example.springbootprac17.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;

@Controller
public class ThyController {
    @RequestMapping("/thy")
    public String thy(Model model){
        model.addAttribute("message","今天是周一下午");
        model.addAttribute("currentTime",new Date());

        //对应的模板名称 thy.html
        return "thy";
    }
}
